<?php
require_once('lzu_op_fns.php');
if(session_status() == PHP_SESSION_NONE) {
    session_start();
}
@$sno=$_POST['sno'];
@$passwd=$_POST['passwd'];
if($sno&&$passwd){
    try{
        login($sno,$passwd);
        $_SESSION['valid_user']=$sno;
    }catch(Exception $e){
        do_html_header('错误');
        echo "无法登录<br>";
        echo "<a href='login.php'>点击以返回登录界面</a>";
        do_html_footer();
        exit;
    }
}
header('Location:user_center.php');
?>